package com.fumin.common;

import com.fumin.pojo.CoinCount;
import com.fumin.pojo.User;

import java.util.List;
import java.util.UUID;

/**
 * Created by Lingo on 2018/2/13.
 */
public class CalV1 extends AbstractCalculator implements ICoinCountor {

    private static Integer BASE = 72;
    private static Integer SECOND = 24;
    private static Integer THIRD= 8;

    @Override
    public List<CoinCount> countCoin(List<User> user) {
        List<CoinCount> cache = makeResult(user);
        for (CoinCount temp:cache) {
            if (temp.getLevel()==0){
                temp.setCount(BASE);
            }else if(temp.getLevel()==1){
                temp.setCount(SECOND);
            }else if(temp.getLevel()==2){
                temp.setCount(THIRD);
            }
        }
        return cache;
    }
}
